{{#hasEnums}}
import com.squareup.moshi.Json
{{/hasEnums}}
import com.google.gson.annotations.SerializedName
import {{packageName}}.base.*
import {{packageName}}.infrastructure.ApiClient
import {{packageName}}.infrastructure.RequestConfig
import java.time.LocalDateTime

/**
{{#description}}{{{description}}}{{/description}}
{{#vars}}
 * @param {{nameInCamelCase}} {{#description}}{{{description}}}{{/description}}
{{/vars}}
 */
{{^vendorExtensions.x-is-locator}}data {{/vendorExtensions.x-is-locator}}class {{classname}}(
{{#requiredVars}}
{{>data_class_req_var}}{{^-last}},
{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}},
{{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>data_class_opt_var}}{{^-last}},
{{/-last}}{{/optionalVars}}
) : {{vendorExtensions.x-object-type}}{{#vendorExtensions.x-is-list}}{{#vars}}{{#vendorExtensions.x-is-first-container-var}}<{{>type_param_for_container_var}}>{{/vendorExtensions.x-is-first-container-var}}{{/vars}}{{/vendorExtensions.x-is-list}}() {
    @Transient private val classModelName: String = "{{name}}"

    {{#vendorExtensions.x-is-list}}
    {{#vars}}
        {{#vendorExtensions.x-is-first-container-var}}
            {{^isPrimitiveType}}
    override fun items(): List<{{>type_param_for_container_var}}> {
        if ({{nameInCamelCase}} == null)
            return emptyList()
        return {{nameInCamelCase}}
    }

            {{/isPrimitiveType}}
        {{/vendorExtensions.x-is-first-container-var}}
    {{/vars}}
    {{/vendorExtensions.x-is-list}}
    {{#vendorExtensions.x-is-paginated}}
    override fun requestNextPage(apiClient: ApiClient, requestConfig: RequestConfig): {{classname}} {
        val response = apiClient.request<{{classname}}>(requestConfig)
        return ApiClient.processResponse(response)
    }
    {{/vendorExtensions.x-is-paginated}}
{{#hasEnums}}{{#vars}}{{#isEnum}}
    /**
    * {{{description}}}
    * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
    */
    enum class {{nameInCamelCase}}Enum(val value: {{datatype}}){
    {{#allowableValues}}{{#enumVars}}
        @Json(name = {{{value}}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
    {{/enumVars}}{{/allowableValues}}
    }
{{/isEnum}}{{/vars}}{{/hasEnums}}
}
